<template>
	<view>
		<!-- 主体区域 -->
		<view class="main">
			<view class="item" v-for="item in testData">
				<view class="title">{{item.testProject}}</view>
				<view class="desc">
					<view>{{item.testTime}}，共<text>{{item.questNum}}</text>道，做对<text>{{item.collNum}}</text>道，正确率<text>{{item.accuracy}}</text>%</view>
				</view>
			</view>
		</view>
		
		<!-- 提示信息弹窗 -->
		<popup ref="popup"></popup>
	</view>
</template>

<script>
	import popup from "@/components/popup.vue";
	export default {
		components:{popup},
		data() {
			return {
				testData:[
					{
						testProject:"填空拼写",
						testTime:"2023-01-08",
						questNum:15,
						collNum:10,
						errorNum:5,
						accuracy:66,
					},
					{
						testProject:"中文选词",
						testTime:"2023-01-08",
						questNum:20,
						collNum:10,
						errorNum:10,
						accuracy:50,
					},
					{
						testProject:"听音选意",
						testTime:"2023-01-10",
						questNum:10,
						collNum:10,
						errorNum:0,
						accuracy:100,
					},
					{
						testProject:"听音选义",
						testTime:"2023-01-01",
						questNum:15,
						collNum:10,
						errorNum:5,
						accuracy:66,
					},
					{
						testProject:"英文选义",
						testTime:"2023-01-08",
						questNum:15,
						collNum:10,
						errorNum:5,
						accuracy:66,
					},
				],
				themeColor:"",
				themeColorLess:"",
			};
		},
		onLoad(){
			//获取主题颜色
			let color = uni.getStorageSync("color");
			this.themeColor = JSON.parse(color).themeColor;
			this.themeColorLess = JSON.parse(color).themeColorLess;
		},
	}
</script>

<style lang="scss">
	page{
		background-color: $bg-color;
	}
	//主体区域
	.main{
		background-color: white;
		margin-top: 30rpx;
		
		.item{
			margin: 0 40rpx;
			padding: 26rpx 0;
			border-bottom: solid $border-color $border-size;
			display: flex;
			flex-direction: column;
			
			.title{
				font-size: 28rpx;
				font-weight: 600;
				color: #283044;
			}
			.desc{
				padding-top: 20rpx;
				font-size: 26rpx;
				color: #5a5a5a;
				text{
					color: $theme-color;
					font-weight: 600;
				}
			}
		}
	}
</style>
